package com.yixuan.mt.common.utitls;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

public class IOUtils {
    public static void updateFileIntContent(String filePath, int pos, int value) throws IOException {
        // 读取文件
        File file = new File(filePath);
        RandomAccessFile raf = new RandomAccessFile(file, "rw");
        try (raf) {
            raf.seek(pos);
            raf.writeInt(value);
        }
    }
}
